package org.darcy.youchat.activity.contacts;


import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;

import org.darcy.youchat.R;
import org.darcy.youchat.activity.BaseActivity;
import org.darcy.youchat.databinding.ActivityAllTagBinding;
import org.darcy.youchat.utils.UIUtils;


/**
 * 所有标签
 */
public class AllTagActivity extends BaseActivity {

    private ActivityAllTagBinding binding;
    private final String titleName = "所有标签";

    @Override
    public void initView() {
        binding = ActivityAllTagBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());
        setSupportActionBar(binding.mToolbar.toolbar);
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        getSupportActionBar().setTitle(titleName);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        new MenuInflater(this).inflate(R.menu.menu_one_text, menu);
        menu.getItem(0).setTitle("新建");
        return super.onCreateOptionsMenu(menu);
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
            case android.R.id.home:
                finish();
                break;
            case R.id.itemOne:
                UIUtils.showToast("新建");
                break;
        }
        return super.onOptionsItemSelected(item);
    }

}
